# 测试用例执行入口
import unittest
import time
from scripts_测试脚本.testLaoHuangLi01 import testLaoHuangLi01
from scripts_测试脚本.testLaoHuangLi02 import testLaoHuangLi02
from scripts_测试脚本.testLaoHuangLi03 import testLaoHuangLi03
from tools_第三方工具包.HTMLTestRunner import HTMLTestRunner
# 封装测试套件
suite =unittest.TestSuite()
# 添加测试脚本
suite.addTest(unittest.makeSuite(testLaoHuangLi01))
suite.addTest(unittest.makeSuite(testLaoHuangLi02))
suite.addTest(unittest.makeSuite(testLaoHuangLi03))


#  指定报告路径
report = "./report_测试报告/repor-{}.html".format(time.strftime("%Y%m%d-%H%M%S"))

# 打开文件流
with open(report,"wb") as f :
    # 创建HTMLTestRunner执行器
    runner = HTMLTestRunner(f,title="老黄历接口测试报告")
    # 执行测试套件
    runner.run(suite)
